"""
通用序列（主要是字符串和列表）
"""

# 定义字符串
# str1 = "python"
# 定义列表
# 数字、字符串、...
# list1 = [1,2,3,6]
# list2 = ["a","bb","ccc"]

# 索引
# str2 = "sfgedg"
# print(str2[4])
# print(str2[-6])
# print(list2[1])

# 分片(切片)
# str3 = "abcdefgh"
# print(str3)
# print(str3[:])
# print(str3[5:])
# print(str3[:-1])
# print(str3[::2])
# print(str3[:6:2])
# print(str3[:-4:2])
# print(str3[-6:-4:2])

# 连接
# str4 = "111aaa"
# str5 = "222bbb"
# print(str4 + str5)

# list3 = ["1","1","1","a",'a','a']
# list4 = ["2","2","2",'b',"b","b"]
# print(list3 + list4)

# print(str4 + list4)  # 错误的

# print(str4 * 3)
# print(list3 * 3)

#内置函数
# print(len(str4))  # 求长度
# print(min(str4))
# print(max(list4))  # 求最大值，比较的是ASCII码
# print(str4.index("a"))
# print(list4.count("2"))




